home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr52 / expand53.zip / XPDEMO.ZIP / XPUTIL.PRG < prev   
Text File  |  1992-08-17  |  2KB  |  102 lines

  1. * ------------------------------------------------------------------------
  2. * Module......:    XPUTIL.PRG
  3. * Title.......: UTIL part of the Expand Library Demonstration Program
  4. * Author......:    Pepijn Smits.
  5. * Date........:    July/August 1992
  6. * Copyright...:    (c)1992 by Softwarebureau Pepijn Smits
  7. * Notes.......:    Clipper 5.01 Demo of the Expand Library
  8. *        Some general Util functions
  9. *        See XPDEMO.RMK For Compile and Link instructions.
  10. * ------------------------------------------------------------------------
  11. #include "..\EXPAND.CH"
  12.  
  13. Function nTrim(s)
  14. Return AllTrim(Str(s))
  15.  
  16. Function PCXname()
  17. Return (Left(XPmyname(),Len(XPmyName())-3)+'PCX')
  18.  
  19. Function MyDrive()
  20. Return Left(XPmyName(),2)
  21.  
  22. Function notYet()
  23. XPalert("Sorry..",;
  24.     "I'm ~so~ Sorry, but I haven't had the time to implement this part;"+;
  25.     "of the ~Expand Library~ Demonstration program..;Better next time!")
  26. Return (NIL)
  27.  
  28. Function About()
  29. XPalert('About..',';This is the Demonstration program for the;;'+;
  30.         [~Expand Library v3.00~, Released August 1992;;]+;
  31.         'This program is written in ~Clipper 5.01~ using the named Library.;'+;
  32.         'Copyright (c)1992 by ~Softwarebureau Pepijn Smits~;'+;
  33.         'Written by Pepijn Smits')
  34. Return (NIL)
  35.  
  36. Function XPinfo()
  37. XPalert('Information about the makers of the ~Expand~ Library',;
  38.     ';The ~Expand Library~ was written by Pepijn Smits and he can be reached at;;'+;
  39.     'Sophiastraat 8;'+;
  40.     '3061 LT Rotterdam;'+;
  41.     'The Netherlands;'+;
  42.     'Tel : +31-10-2120589;'+;
  43.     'Fax : +31-10-2121205')
  44. Return (NIL)
  45.  
  46. Function XPstop()
  47. if XPask('Quit','Are you sure you want to ~Quit~?')
  48.     set color to
  49.     @ MaxRow(),0
  50.     quit
  51. end
  52. Return (NIL)
  53.  
  54. Function TypeRate()
  55. Local i := XPalert('Typematic ~Rate~ Set',;
  56.         'Set the ~Delay~ before repeat to',;
  57.         {"¼s","½s","1s"},2)
  58. Local j := 0
  59.  
  60. if i<>0 
  61.    j := XPalert('Typematic ~Rate~ Set',;
  62.         'Set the ~Repeat~ rate to:',;
  63.         {"~2~ cps","~5~ cps","~10~ cps","~20~ cps","~30~ cps"},3)
  64. end
  65.  
  66. if i=0 .or. j=0
  67.     Return (NIL)
  68. end
  69.  
  70. if (i = 2)
  71.     i := 1
  72. elseif (i = 1)
  73.     i := 0
  74. else
  75.     i := 3
  76. endif
  77.  
  78. do case
  79. case (j = 0) .or. (j = 3)
  80.     j := CPS10
  81. case (j = 1)
  82.     j := CPS2
  83. case (j = 2)
  84.     j := CPS5
  85. case (j = 4)
  86.     j := CPS20
  87. case (j = 5)
  88.     j := CPS30
  89. endcase
  90. XPkeySpeed(i,j)
  91. Return (NIL)
  92.  
  93. Function Prompt(cTitle,cText,Default)
  94. Local x
  95. XPpushScr()
  96. Default := Padr(Default,58)
  97. XPbox2(9,9,12,71,cTitle)
  98. @ 10,11 say cText
  99. x := XPmouseGet(11,11,Default)
  100. XPpopScr()
  101. Return Alltrim(x)
  102.